package com.linwen.javase.desgin_pattern.BigTalkDesignPattenJAVACode._09建造者模式._4建造者3;
import java.awt.Graphics;
import javax.swing.JFrame;

class Test extends JFrame {

    public Test() {
        setSize(400, 400);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
    }

    public void paint(Graphics g) {

        PersonBuilder gThin = new PersonThinBuilder(g);
        PersonDirector pdThin = new PersonDirector(gThin);
        pdThin.CreatePerson();

        PersonBuilder gFat = new PersonFatBuilder(g);
        PersonDirector pdFat = new PersonDirector(gFat);
        pdFat.CreatePerson();
        
    }

    public static void main(String[] args) {
        new Test().setVisible(true);
    }
}








